package com.echo.fm.log.system;

import java.util.List;

import org.hibernate.criterion.Criterion;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import com.echo.fm.log.system.model.SystemLog;
import com.echo.util.ErrorException;

@Service("systemLogService")
public class DefaultSystemLogServiceImpl implements ISystemLogService {
	@Autowired
	@Qualifier("systemLogPersistence")
	ISystemLogPersistence systemLogPersistence;

	public ISystemLogPersistence getSystemLogPersistence() {
		return systemLogPersistence;
	}

	public void setSystemLogPersistence(ISystemLogPersistence systemLogPersistence) {
		this.systemLogPersistence = systemLogPersistence;
	}

	public void createSystemLog(SystemLog systemLog) throws ErrorException {
		systemLogPersistence.createSystemLog(systemLog);

	}

	public void updateSystemLog(SystemLog systemLog) throws ErrorException {
		systemLogPersistence.updateSystemLog(systemLog);

	}

	public void deleteSystemLog(SystemLog systemLog) throws ErrorException {
		systemLogPersistence.deleteSystemLog(systemLog);
	}

	public SystemLog searchSystemLogById(String id) throws ErrorException {

		return systemLogPersistence.searchSystemLogById(id);
	}

	public List<SystemLog> searchSystemLogList(List<Criterion> criterions) throws ErrorException {
		return systemLogPersistence.searchSystemLogList(criterions);
	}

	public List<SystemLog> pagesSystemLogList(List<Criterion> criterions, int firstResult) throws ErrorException {
		return systemLogPersistence.pagesSystemLogList(criterions, firstResult);
	}

	public int pagesSystemLogCount(List<Criterion> criterions) throws ErrorException {
		return systemLogPersistence.pagesSystemLogCountList(criterions);
	}

}
